package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;


public class    BibliotecaController {

    menu menu = new menu();
    customer_menu_option customer_menu_option = new customer_menu_option();

    public void show_infor(){
        menu.show_menu();
    }
    public void menu_option() throws IOException {
        ArrayList<String> menu_list = menu.get_Menu_list();
        boolean con = true;

        do{
            String option = get_customer_option_name();
            if (customer_menu_option.check_option_valid(menu_list,option)){
                customer_menu_option.menu_option(option);
            }
            else {
                System.out.println("Select a valid option!");
            }
        }while (con);
    }
    public String get_customer_option_name() throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("plealse enter your option");
        return  br.readLine();
    }
}
